<template>
  <div class="container">
    <el-dialog width="1350px" title="调拨单详情" :visible.sync="dialog.centerDialogVisible" @open="getData" center>
      <el-table :data="tableData" border style="width: 100%" empty-text="暂无数据">
      <el-table-column prop="erp_goods_code" label="商品编码"  align="center"></el-table-column>
      <el-table-column prop="goods_name" label="商品名称" align="center"></el-table-column>
       <el-table-column prop="goods_unit" label="商品单位" align="center"></el-table-column>
          <el-table-column prop="batch_code" label="批次编码" align="center"></el-table-column>
      <el-table-column prop="bar_code" label="商品条码" align="center"></el-table-column>
        <el-table-column prop="category_code" label="品类编码"  align="center"></el-table-column>
      <el-table-column prop="category_name" label="品类名称"  align="center"></el-table-column>
      <el-table-column prop="goods_spec" label="商品规格" align="center"></el-table-column>
       <el-table-column prop="goods_num" label="调拨数量"  align="center"></el-table-column>
      <el-table-column prop="goods_price" label="调拨价格"  align="center"></el-table-column>
      <el-table-column prop="goods_cost" label="调拨成本"  align="center"></el-table-column>
      <el-table-column prop="markup" label="调拨加价" align="center"></el-table-column>
      <el-table-column prop="out_house_code" label="调出仓库编码" align="center"></el-table-column>
       <el-table-column prop="out_house_name" label="调出仓库名称" align="center"></el-table-column>
      <el-table-column prop="inp_house_code" label="调入仓库编码" align="center"></el-table-column>
      <el-table-column prop="inp_house_name" label="调入仓库名称" align="center"></el-table-column>

      </el-table>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="confirm">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { findAllocationInfo } from "@/api/superAllot/superAllotList";
export default {
  props: {
    dialog: Object
  },
  data() {
    return {
      tableData: [],
    };
  },
  methods: {
    confirm() {
      this.dialog.centerDialogVisible = false;
    },
    getData() {
      let data = {
        id: this.dialog.id
      };
      findAllocationInfo(data).then(res => {
        if (res.code == 0) {
            this.tableData = res.data.goods;
        }
      });
    },
    //每页多少条
    handleCurrentChange(val) {
      this.pageData.page = 1;
      this.pageData.pageSize = val;
      this.getData();
    },
    //选取页数
    handleSizeChange(page) {
      this.pageData.page = page;
      this.getData();
    }
  }
};
</script>
<style scoped>
.pagination {
  text-align: right;
  padding: 10px;
}
</style>